package com.hzqy.web.filter;

import com.hzqy.commons.utils.IpUtil;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;

public class Log4jListener implements ServletContextListener {


    @Override
    public void contextInitialized(ServletContextEvent sce) {
        String ip = IpUtil.getLocalIP();
        System.setProperty("localhost_ip", ip.replaceAll("\\.", ""));
    }

    @Override
    public void contextDestroyed(ServletContextEvent sce) {

    }

}
